package cn.nexd.app.collector.model;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by xun on 16/10/10.
 */

public class FileManagerModel {
    /**
     * 文件模型结构
     *
     *
     * --20161101    parentName
     *   |
     *   XiDanDaYueCheng_F2_20161101093939_wx@nexdtech.com.zip     childFileName
     *   |
     *   XiDanDaYueCheng_F2_20161101093939_wx@nexdtech.com.zip
     *
     * --20161102
     *   |
     *   XiDanDaYueCheng_F2_20161101093939_wx@nexdtech.com.zip
     *   |
     *   XiDanDaYueCheng_F2_20161101093939_wx@nexdtech.com.zip
     *   .
     *   .
     *   .
     *   .
     */

    private String parentName;   // 父级文件名称
    private List<String> childFileNames; // 子文件名字集合

    public void setParentName(String parentName) {
        this.parentName = parentName;
    }

    public void setChildFileNames(List<String> childFileNames) {
        this.childFileNames.clear();
        this.childFileNames.addAll(childFileNames);
    }

    public String getParentName() {
        return parentName;
    }

    public List<String> getChildFileNames() {
        return childFileNames;
    }

    public FileManagerModel(String parentName) {
        this.parentName = parentName;
        this.childFileNames = new ArrayList<>();
    }

    public FileManagerModel() {
        childFileNames = new ArrayList<>();
    }

    @Override
    public String toString() {
        return "FileManagerModel{" +
                "parentName='" + parentName + '\'' +
                ", childFileNames=" + childFileNames +
                '}';
    }
}
